/*
 * Copyright (c) 2025 Huawei Technologies Co., Ltd.
 * openUBMC is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *         http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */

#ifndef DEVMON_DEVICE_MANAGER_H
#define DEVMON_DEVICE_MANAGER_H

#include "device/csr.h"
#include "topology/device_topo.h"
#include <mc/engine.h>

namespace devmon {

class device_manager {
public:
    static device_manager& get_instance() {
        static device_manager instance;
        return instance;
    }

    void add_device(mc::engine::service* service, const std::string& csr_file, mc::dict connector);
    void remove_device(const mc::dict& connector);

private:
    device_manager()                                 = default;
    device_manager(const device_manager&)            = delete;
    device_manager& operator=(const device_manager&) = delete;

    device_csr m_device_csr;
};

} // namespace devmon

#endif // DEVMON_DEVICE_MANAGER_H